## API Report File for "@backstage/plugin-todo-backend"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { CatalogApi } from '@backstage/catalog-client';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Config } from '@backstage/config';
import express from 'express';
import { Logger } from 'winston';
import { ScmIntegrations } from '@backstage/integration';
import { ServiceRef } from '@backstage/backend-plugin-api';
import { UrlReader } from '@backstage/backend-common';

// @public (undocumented)
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public (undocumented)
export function createTodoParser(options?: TodoParserOptions): TodoParser;

// @public (undocumented)
export type ListTodosRequest = {
  entity?: CompoundEntityRef;
  offset?: number;
  limit?: number;
  orderBy?: {
    field: 'text' | 'tag' | 'author' | 'viewUrl' | 'repoFilePath';
    direction: 'asc' | 'desc';
  };
  filters?: {
    field: 'text' | 'tag' | 'author' | 'viewUrl' | 'repoFilePath';
    value: string;
  }[];
};

// @public (undocumented)
export type ListTodosResponse = {
  items: TodoItem[];
  totalCount: number;
  offset: number;
  limit: number;
};

// @public (undocumented)
export type ReadTodosOptions = {
  url: string;
};

// @public (undocumented)
export type ReadTodosResult = {
  items: TodoItem[];
};

// @public (undocumented)
export interface RouterOptions {
  // (undocumented)
  todoService: TodoService;
}

// @public (undocumented)
export type TodoItem = {
  text: string;
  tag: string;
  author?: string;
  viewUrl?: string;
  lineNumber?: number;
  repoFilePath?: string;
};

// @public (undocumented)
export type TodoParser = (ctx: TodoParserContext) => TodoParserResult[];

// @public (undocumented)
export type TodoParserContext = {
  content: string;
  path: string;
};

// @public (undocumented)
export type TodoParserOptions = {
  additionalTags?: string[];
};

// @public (undocumented)
export type TodoParserResult = {
  text: string;
  tag: string;
  author?: string;
  lineNumber: number;
};

// @public
const todoPlugin: () => BackendFeature;
export default todoPlugin;

// @public (undocumented)
export interface TodoReader {
  readTodos(options: ReadTodosOptions): Promise<ReadTodosResult>;
}

// @public (undocumented)
export class TodoReaderService implements TodoService {
  constructor(options: TodoReaderServiceOptions);
  // (undocumented)
  listTodos(
    req: ListTodosRequest,
    options?: {
      token?: string;
    },
  ): Promise<ListTodosResponse>;
}

// @public (undocumented)
export type TodoReaderServiceOptions = {
  todoReader: TodoReader;
  catalogClient: CatalogApi;
  maxPageSize?: number;
  defaultPageSize?: number;
};

// @public (undocumented)
export const todoReaderServiceRef: ServiceRef<TodoReader, 'plugin'>;

// @public (undocumented)
export class TodoScmReader implements TodoReader {
  constructor(options: TodoScmReaderOptions);
  // (undocumented)
  static fromConfig(
    config: Config,
    options: Omit<TodoScmReaderOptions, 'integrations'>,
  ): TodoScmReader;
  // (undocumented)
  readTodos(options: ReadTodosOptions): Promise<ReadTodosResult>;
}

// @public (undocumented)
export type TodoScmReaderOptions = {
  logger: Logger;
  reader: UrlReader;
  integrations: ScmIntegrations;
  parser?: TodoParser;
  filePathFilter?: (filePath: string) => boolean;
};

// @public (undocumented)
export interface TodoService {
  // (undocumented)
  listTodos(
    req: ListTodosRequest,
    options?: {
      token?: string;
    },
  ): Promise<ListTodosResponse>;
}
```
